<?php
$route->any('login', 'AuthController@login')->name('admin.user.login');
$route->any('test', 'TestController@index');

$route->any('about/us/info', 'ConfigController@aboutUsInfo');
$route->post('feedback/store', 'FeedbackController@store');
$route->get('banner/index', 'BannerController@index')->name('admin.banner.index');
$route->any('pc/product/index', 'ProductController@pc_index');
$route->any('pc/product/search', 'ProductController@pc_search');
$route->any('pc/product/list', 'ProductController@pc_list');
$route->any('partner/index', 'PartnerController@index');

$route->group(['middleware' => 'api.auth'], function ($route) {

    //管理员
    $route->get('admin/index', 'AdminController@index')->name('admin.admin.index');
    $route->get('logout', 'AdminController@logout')->name('admin.admin.logout');
    $route->post('admin/store', 'AdminController@store')->name('admin.admin.store');
    $route->post('password/update', 'AdminController@updatePwd')->name('admin.password.update');
    $route->any('permission', 'AuthController@permission');

    //user
    $route->any('user/index', 'UserController@index');
    $route->any('user/store', 'UserController@store');
    $route->any('user/info', 'UserController@info');

    //banner
    $route->get('banner/info', 'BannerController@info')->name('admin.banner.info');
    $route->post('banner/store', 'BannerController@store')->name('admin.banner.store');
    $route->post('banner/destroy', 'BannerController@destroy')->name('admin.banner.destroy');


    $route->any('about/us/store', 'ConfigController@aboutUsStore');

    //feedback
    $route->any('feedback/index', 'FeedbackController@index');
    $route->any('feedback/info', 'FeedbackController@info');
    $route->post('feedback/destroy', 'FeedbackController@destroy');


    //product
    $route->any('product/index', 'ProductController@index');
    $route->any('product/info', 'ProductController@info');
    $route->post('product/destroy', 'ProductController@destroy');
    $route->post('product/store', 'ProductController@store');
    $route->post('product/edit/status', 'ProductController@editStatus');


    //category
    $route->get('category/index', 'CategoryController@index');
    $route->get('category/info', 'CategoryController@info');
    $route->post('category/store', 'CategoryController@store');
    $route->post('category/destroy', 'CategoryController@destroy');
    $route->post('category/edit/status', 'CategoryController@editStatus');



    $route->any('partner/info', 'PartnerController@info');
    $route->post('partner/destroy', 'PartnerController@destroy');
    $route->post('partner/store', 'PartnerController@store');
    $route->post('partner/edit/status', 'PartnerController@editStatus');

});


